# Copyright (c) 2021 by xfangfang. All Rights Reserved.

import logging
import gettext

from .protocol import DLNAProtocol
from .server import Service
from macast_renderer.udp import UDPRenderer
#from macast_renderer.mpv import MPVRenderer

logger = logging.getLogger("main")
logger.setLevel(logging.DEBUG)
_ = gettext.gettext

def cli(renderer=None, protocol=None):
    if renderer is None:
        renderer = UDPRenderer()
        #renderer = MPVRenderer()
    if protocol is None:
        protocol = DLNAProtocol()
    Service(renderer, protocol).run()
